using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsUsers: BusinessObjectBase
	{

		public ClsUsers() {}

		#region InnerClass
		public enum ClsUsersFields
		{
			UserID,
			UserName,
			DisplayName,
			Imei,
			Description,
			Password,
			Email,
			RoleID
		}
		#endregion

		#region Data Members

			int _userID;
			string _userName;
			string _displayName;
			string _imei;
			string _description;
			string _password;
			string _email;
			int? _roleID;

		#endregion

		#region Properties

		public int  UserID
		{
			 get { return _userID; }
			 set
			 {
				 if (_userID != value)
				 {
					_userID = value;
					 PropertyHasChanged("UserID");
				 }
			 }
		}

		public string  UserName
		{
			 get { return _userName; }
			 set
			 {
				 if (_userName != value)
				 {
					_userName = value;
					 PropertyHasChanged("UserName");
				 }
			 }
		}

		public string  DisplayName
		{
			 get { return _displayName; }
			 set
			 {
				 if (_displayName != value)
				 {
					_displayName = value;
					 PropertyHasChanged("DisplayName");
				 }
			 }
		}

		public string  Imei
		{
			 get { return _imei; }
			 set
			 {
				 if (_imei != value)
				 {
					_imei = value;
					 PropertyHasChanged("Imei");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public string  Password
		{
			 get { return _password; }
			 set
			 {
				 if (_password != value)
				 {
					_password = value;
					 PropertyHasChanged("Password");
				 }
			 }
		}

		public string  Email
		{
			 get { return _email; }
			 set
			 {
				 if (_email != value)
				 {
					_email = value;
					 PropertyHasChanged("Email");
				 }
			 }
		}

		public int?  RoleID
		{
			 get { return _roleID; }
			 set
			 {
				 if (_roleID != value)
				 {
					_roleID = value;
					 PropertyHasChanged("RoleID");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("UserID", "UserID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("UserName", "UserName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("DisplayName", "DisplayName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Imei", "Imei",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Password", "Password",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Email", "Email",100));
		}

		#endregion

	}
}
